import React,{ PureComponent } from 'react';
import { connect } from 'react-redux';
import { RecommentWrapper, RecommentItem } from '../style';

class Recommend extends PureComponent{

    render() {
        const { list } = this.props;
        return (
            <RecommentWrapper>
                {
                    list.map((item) => {
                        return (
                            <RecommentItem key={item.get("id")} imgUrl={item.get("imgUrl")}></RecommentItem>
                        );
                    })
                }
            </RecommentWrapper>
        );
    }
}
const mapStateToProps = (state) => ({
    list: state.getIn(["home", "recommentList"])
});
export default connect(mapStateToProps, null)(Recommend);